package com.pureut.production.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pureut.production.domain.FeedRecord;
import com.pureut.production.domain.dto.FeedRecordDto;
import com.pureut.production.domain.dto.FeedingStatisticsDto;
import com.pureut.production.domain.vo.FeedRecordVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description
 * @Param
 * @Date
 * @Author hl
 **/
@Mapper
public interface FeedRecordMapper extends BaseMapper<FeedRecord> {

    /**
     * 查询投料记录
     */
    List<FeedRecordDto> selectFeedRecordList(FeedRecordVo feedRecordVo);

    /**
     * 新增投料记录
     */
    int insertFeedRecord(FeedRecord feedRecord);

    /**
     * 批量新增投料记录
     */
    int insertBatchFeedRecord(@Param("feedRecordList") List<FeedRecord> feedRecordList);

    /**
     * 删除投料记录
     */
    int deleteFeedRecordById(long feedId);

    /**
     * 投料记录统计
     */
    List<FeedingStatisticsDto> selectFeedRecordStatistics(long feedId);

    /**
     * 投料记录查看
     */
    FeedRecordDto viewFeedRecord(Long id);
}
